<!-- HTML header for doxygen 1.8.8-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <!-- For Mobile Devices -->
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
        <meta name="generator" content="Doxygen 1.8.20"/>
        <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
        <title>libevdev: /home/whot/code/libevdev/release/libevdev/build.uQTRHZxVc0/libevdev/libevdev-uinput.h Source File</title>
        <!--<link href="tabs.css" rel="stylesheet" type="text/css"/>-->
        <script type="text/javascript" src="dynsections.js"></script>
        <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
        <link href="doxygen.css" rel="stylesheet" type="text/css" />
        <link href="bootstrap.css" rel="stylesheet" type="text/css"/>
<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
<link href="libevdevdoxygen.css" rel="stylesheet" type="text/css"/>
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
        <script type="text/javascript" src="doxy-boot.js"></script>
    </head>
    <body>
        <nav class="navbar navbar-default" role="navigation">
            <div class="container">
                <div class="navbar-header">
                    <a class="navbar-brand">libevdev 1.10.0</a>
                </div>
            </div>
        </nav>
        <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
            <div class="content" id="content">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-12 panel panel-default" style="padding-bottom: 15px;">
                            <div style="margin-bottom: 15px;">
<!-- end header part -->
<!-- Generated by Doxygen 1.8.20 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_237a012ffe1a208b10d31c74b4ef545e.html">libevdev</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">libevdev-uinput.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="libevdev-uinput_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright © 2013 Red Hat, Inc.</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * Permission to use, copy, modify, distribute, and sell this software and its</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * documentation for any purpose is hereby granted without fee, provided that</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * the above copyright notice appear in all copies and that both that copyright</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * notice and this permission notice appear in supporting documentation, and</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * that the name of the copyright holders not be used in advertising or</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * publicity pertaining to distribution of the software without specific,</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * written prior permission.  The copyright holders make no representations</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * about the suitability of this software for any purpose.  It is provided &quot;as</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * is&quot; without express or implied warranty.</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> * OF THIS SOFTWARE.</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160; </div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#ifndef LIBEVDEV_UINPUT_H</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#define LIBEVDEV_UINPUT_H</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160; </div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160; </div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="libevdev_8h.html">libevdev/libevdev.h</a>&gt;</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160; </div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="keyword">struct </span>libevdev_uinput;</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160; </div>
<div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="libevdev-uinput_8h.html#a6546acd3e4fe75a74d91eebf9bbd3d03">  109</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="libevdev-uinput_8h.html#a6546acd3e4fe75a74d91eebf9bbd3d03">libevdev_uinput_open_mode</a> {</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;        <span class="comment">/* intentionally -2 to avoid to avoid code like the below from accidentally working:</span></div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;<span class="comment">                fd = open(&quot;/dev/uinput&quot;, O_RDWR); // fails, fd is -1</span></div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;<span class="comment">                libevdev_uinput_create_from_device(dev, fd, &amp;uidev); // may hide the error */</span></div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;        <a class="code" href="libevdev-uinput_8h.html#a6546acd3e4fe75a74d91eebf9bbd3d03adcf2d4de38844ee3a8c830bc3285afad">LIBEVDEV_UINPUT_OPEN_MANAGED</a> = -2  </div>
<div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="libevdev-uinput_8h.html#a6546acd3e4fe75a74d91eebf9bbd3d03adcf2d4de38844ee3a8c830bc3285afad">  114</a></span>&#160;};</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160; </div>
<div class="line"><a name="l00153"></a><span class="lineno"><a class="line" href="group__uinput.html#gaf14b21301bac9d79c20e890172873b96">  153</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="group__uinput.html#gaf14b21301bac9d79c20e890172873b96">libevdev_uinput_create_from_device</a>(<span class="keyword">const</span> <span class="keyword">struct</span> libevdev *dev,</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;                                       <span class="keywordtype">int</span> uinput_fd,</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;                                       <span class="keyword">struct</span> libevdev_uinput **uinput_dev);</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160; </div>
<div class="line"><a name="l00168"></a><span class="lineno"><a class="line" href="group__uinput.html#ga9dfa58a84eb4c6b97107dcf3fa621329">  168</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__uinput.html#ga9dfa58a84eb4c6b97107dcf3fa621329">libevdev_uinput_destroy</a>(<span class="keyword">struct</span> libevdev_uinput *uinput_dev);</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160; </div>
<div class="line"><a name="l00183"></a><span class="lineno"><a class="line" href="group__uinput.html#ga9cd7fb14a96d4cc14d3dffdcead84c5d">  183</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="group__uinput.html#ga9cd7fb14a96d4cc14d3dffdcead84c5d">libevdev_uinput_get_fd</a>(<span class="keyword">const</span> <span class="keyword">struct</span> libevdev_uinput *uinput_dev);</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160; </div>
<div class="line"><a name="l00209"></a><span class="lineno"><a class="line" href="group__uinput.html#gaacca93061fce57cec0ce3c52e443a427">  209</a></span>&#160;<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="group__uinput.html#gaacca93061fce57cec0ce3c52e443a427">libevdev_uinput_get_syspath</a>(<span class="keyword">struct</span> libevdev_uinput *uinput_dev);</div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160; </div>
<div class="line"><a name="l00231"></a><span class="lineno"><a class="line" href="group__uinput.html#ga4c595bcda748b08561e2819fe9b7c2d2">  231</a></span>&#160;<span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="group__uinput.html#ga4c595bcda748b08561e2819fe9b7c2d2">libevdev_uinput_get_devnode</a>(<span class="keyword">struct</span> libevdev_uinput *uinput_dev);</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160; </div>
<div class="line"><a name="l00247"></a><span class="lineno"><a class="line" href="group__uinput.html#ga4c3c2f5fcd315a28a067f53b9f855fe7">  247</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="group__uinput.html#ga4c3c2f5fcd315a28a067f53b9f855fe7">libevdev_uinput_write_event</a>(<span class="keyword">const</span> <span class="keyword">struct</span> libevdev_uinput *uinput_dev,</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;                                <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> type,</div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;                                <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> code,</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;                                <span class="keywordtype">int</span> value);</div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;}</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160; </div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* LIBEVDEV_UINPUT_H */</span><span class="preprocessor"></span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="alibevdev_8h_html"><div class="ttname"><a href="libevdev_8h.html">libevdev.h</a></div></div>
<div class="ttc" id="agroup__uinput_html_ga4c595bcda748b08561e2819fe9b7c2d2"><div class="ttname"><a href="group__uinput.html#ga4c595bcda748b08561e2819fe9b7c2d2">libevdev_uinput_get_devnode</a></div><div class="ttdeci">const char * libevdev_uinput_get_devnode(struct libevdev_uinput *uinput_dev)</div><div class="ttdoc">Return the device node representing this uinput device.</div></div>
<div class="ttc" id="agroup__uinput_html_gaf14b21301bac9d79c20e890172873b96"><div class="ttname"><a href="group__uinput.html#gaf14b21301bac9d79c20e890172873b96">libevdev_uinput_create_from_device</a></div><div class="ttdeci">int libevdev_uinput_create_from_device(const struct libevdev *dev, int uinput_fd, struct libevdev_uinput **uinput_dev)</div><div class="ttdoc">Create a uinput device based on the given libevdev device.</div></div>
<div class="ttc" id="alibevdev-uinput_8h_html_a6546acd3e4fe75a74d91eebf9bbd3d03adcf2d4de38844ee3a8c830bc3285afad"><div class="ttname"><a href="libevdev-uinput_8h.html#a6546acd3e4fe75a74d91eebf9bbd3d03adcf2d4de38844ee3a8c830bc3285afad">LIBEVDEV_UINPUT_OPEN_MANAGED</a></div><div class="ttdeci">@ LIBEVDEV_UINPUT_OPEN_MANAGED</div><div class="ttdoc">let libevdev open and close /dev/uinput</div><div class="ttdef"><b>Definition:</b> libevdev-uinput.h:113</div></div>
<div class="ttc" id="agroup__uinput_html_gaacca93061fce57cec0ce3c52e443a427"><div class="ttname"><a href="group__uinput.html#gaacca93061fce57cec0ce3c52e443a427">libevdev_uinput_get_syspath</a></div><div class="ttdeci">const char * libevdev_uinput_get_syspath(struct libevdev_uinput *uinput_dev)</div><div class="ttdoc">Return the syspath representing this uinput device.</div></div>
<div class="ttc" id="agroup__uinput_html_ga9dfa58a84eb4c6b97107dcf3fa621329"><div class="ttname"><a href="group__uinput.html#ga9dfa58a84eb4c6b97107dcf3fa621329">libevdev_uinput_destroy</a></div><div class="ttdeci">void libevdev_uinput_destroy(struct libevdev_uinput *uinput_dev)</div><div class="ttdoc">Destroy a previously created uinput device and free associated memory.</div></div>
<div class="ttc" id="alibevdev-uinput_8h_html_a6546acd3e4fe75a74d91eebf9bbd3d03"><div class="ttname"><a href="libevdev-uinput_8h.html#a6546acd3e4fe75a74d91eebf9bbd3d03">libevdev_uinput_open_mode</a></div><div class="ttdeci">libevdev_uinput_open_mode</div><div class="ttdef"><b>Definition:</b> libevdev-uinput.h:109</div></div>
<div class="ttc" id="agroup__uinput_html_ga9cd7fb14a96d4cc14d3dffdcead84c5d"><div class="ttname"><a href="group__uinput.html#ga9cd7fb14a96d4cc14d3dffdcead84c5d">libevdev_uinput_get_fd</a></div><div class="ttdeci">int libevdev_uinput_get_fd(const struct libevdev_uinput *uinput_dev)</div><div class="ttdoc">Return the file descriptor used to create this uinput device.</div></div>
<div class="ttc" id="agroup__uinput_html_ga4c3c2f5fcd315a28a067f53b9f855fe7"><div class="ttname"><a href="group__uinput.html#ga4c3c2f5fcd315a28a067f53b9f855fe7">libevdev_uinput_write_event</a></div><div class="ttdeci">int libevdev_uinput_write_event(const struct libevdev_uinput *uinput_dev, unsigned int type, unsigned int code, int value)</div><div class="ttdoc">Post an event through the uinput device.</div></div>
<!-- HTML footer for doxygen 1.8.8-->
<!-- start footer part -->
</div>
</div>
</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.20
</small></address>
</body>
</html>
